package nl.ru.rd.facedetection.nnbfd.neuralnetwork;

/**
 * A mathematical function to calculate the signal output of a Neuron.
 * 
 * @author Wouter Geraedts (s0814857 - wgeraedts) PGP 66AA5935
 */
public interface Activationfunction
{
	/**
	 * Calculate the output signal for the given input.
	 * 
	 * @param x
	 *            The input signal.
	 * @return The result of this function for the given input.
	 */
	public double calculate(double x);

	/**
	 * Calculate the derivative signal of this function for the given output (activation).
	 * 
	 * @param y
	 *            The output signal.
	 * @return The result of the derivative of this function for the given output (activation).
	 */
	public double calculateDerivative(double y);
}
